Integrand size = 21, antiderivative size = 198 \[ \int \frac {\tan ^6(c+d x)}{a+b \sec (c+d x)} \, dx=-\frac {x}{a}+\frac {\left (8 a^4-20 a^2 b^2+15 b^4\right ) \text {arctanh}(\sin (c+d x))}{8 b^5 d}-\frac {2 (a-b)^{5/2} (a+b)^{5/2} \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a b^5 d}-\frac {a \left (a^2-2 b^2\right ) \tan (c+d x)}{b^4 d}+\frac {\left (4 a^2-7 b^2\right ) \sec (c+d x) \tan (c+d x)}{8 b^3 d}-\frac {a \tan ^3(c+d x)}{3 b^2 d}+\frac {\sec (c+d x) \tan ^3(c+d x)}{4 b d} \]
-x/a+1/8*(8*a^4-20*a^2*b^2+15*b^4)*arctanh(sin(d*x+c))/b^5/d-2*(a-b)^(5/2) *(a+b)^(5/2)*arctanh((a-b)^(1/2)*tan(1/2*d*x+1/2*c)/(a+b)^(1/2))/a/b^5/d-a *(a^2-2*b^2)*tan(d*x+c)/b^4/d+1/8*(4*a^2-7*b^2)*sec(d*x+c)*tan(d*x+c)/b^3/ d-1/3*a*tan(d*x+c)^3/b^2/d+1/4*sec(d*x+c)*tan(d*x+c)^3/b/d
Leaf count is larger than twice the leaf count of optimal. \(907\) vs. \(2(198)=396\).
Time = 6.53 (sec) , antiderivative size = 907, normalized size of antiderivative = 4.58 \[ \int \frac {\tan ^6(c+d x)}{a+b \sec (c+d x)} \, dx=-\frac {(c+d x) (b+a \cos (c+d x)) \sec (c+d x)}{a d (a+b \sec (c+d x))}-\frac {2 \left (-a^2+b^2\right )^3 \text {arctanh}\left (\frac {(-a+b) \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right ) (b+a \cos (c+d x)) \sec (c+d x)}{a b^5 \sqrt {a^2-b^2} d (a+b \sec (c+d x))}+\frac {\left (-8 a^4+20 a^2 b^2-15 b^4\right ) (b+a \cos (c+d x)) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right ) \sec (c+d x)}{8 b^5 d (a+b \sec (c+d x))}+\frac {\left (8 a^4-20 a^2 b^2+15 b^4\right ) (b+a \cos (c+d x)) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right ) \sec (c+d x)}{8 b^5 d (a+b \sec (c+d x))}+\frac {(b+a \cos (c+d x)) \sec (c+d x)}{16 b d (a+b \sec (c+d x)) \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )^4}+\frac {\left (12 a^2-4 a b-27 b^2\right ) (b+a \cos (c+d x)) \sec (c+d x)}{48 b^3 d (a+b \sec (c+d x)) \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )^2}-\frac {a (b+a \cos (c+d x)) \sec (c+d x) \sin \left (\frac {1}{2} (c+d x)\right )}{6 b^2 d (a+b \sec (c+d x)) \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )^3}-\frac {(b+a \cos (c+d x)) \sec (c+d x)}{16 b d (a+b \sec (c+d x)) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^4}-\frac {a (b+a \cos (c+d x)) \sec (c+d x) \sin \left (\frac {1}{2} (c+d x)\right )}{6 b^2 d (a+b \sec (c+d x)) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^3}+\frac {\left (-12 a^2+4 a b+27 b^2\right ) (b+a \cos (c+d x)) \sec (c+d x)}{48 b^3 d (a+b \sec (c+d x)) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^2}+\frac {(b+a \cos (c+d x)) \sec (c+d x) \left (-3 a^3 \sin \left (\frac {1}{2} (c+d x)\right )+7 a b^2 \sin \left (\frac {1}{2} (c+d x)\right )\right )}{3 b^4 d (a+b \sec (c+d x)) \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )}+\frac {(b+a \cos (c+d x)) \sec (c+d x) \left (-3 a^3 \sin \left (\frac {1}{2} (c+d x)\right )+7 a b^2 \sin \left (\frac {1}{2} (c+d x)\right )\right )}{3 b^4 d (a+b \sec (c+d x)) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )} \]
-(((c + d*x)*(b + a*Cos[c + d*x])*Sec[c + d*x])/(a*d*(a + b*Sec[c + d*x])) ) - (2*(-a^2 + b^2)^3*ArcTanh[((-a + b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]] *(b + a*Cos[c + d*x])*Sec[c + d*x])/(a*b^5*Sqrt[a^2 - b^2]*d*(a + b*Sec[c + d*x])) + ((-8*a^4 + 20*a^2*b^2 - 15*b^4)*(b + a*Cos[c + d*x])*Log[Cos[(c + d*x)/2] - Sin[(c + d*x)/2]]*Sec[c + d*x])/(8*b^5*d*(a + b*Sec[c + d*x]) ) + ((8*a^4 - 20*a^2*b^2 + 15*b^4)*(b + a*Cos[c + d*x])*Log[Cos[(c + d*x)/ 2] + Sin[(c + d*x)/2]]*Sec[c + d*x])/(8*b^5*d*(a + b*Sec[c + d*x])) + ((b + a*Cos[c + d*x])*Sec[c + d*x])/(16*b*d*(a + b*Sec[c + d*x])*(Cos[(c + d*x )/2] - Sin[(c + d*x)/2])^4) + ((12*a^2 - 4*a*b - 27*b^2)*(b + a*Cos[c + d* x])*Sec[c + d*x])/(48*b^3*d*(a + b*Sec[c + d*x])*(Cos[(c + d*x)/2] - Sin[( c + d*x)/2])^2) - (a*(b + a*Cos[c + d*x])*Sec[c + d*x]*Sin[(c + d*x)/2])/( 6*b^2*d*(a + b*Sec[c + d*x])*(Cos[(c + d*x)/2] - Sin[(c + d*x)/2])^3) - (( b + a*Cos[c + d*x])*Sec[c + d*x])/(16*b*d*(a + b*Sec[c + d*x])*(Cos[(c + d *x)/2] + Sin[(c + d*x)/2])^4) - (a*(b + a*Cos[c + d*x])*Sec[c + d*x]*Sin[( c + d*x)/2])/(6*b^2*d*(a + b*Sec[c + d*x])*(Cos[(c + d*x)/2] + Sin[(c + d* x)/2])^3) + ((-12*a^2 + 4*a*b + 27*b^2)*(b + a*Cos[c + d*x])*Sec[c + d*x]) /(48*b^3*d*(a + b*Sec[c + d*x])*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^2) + ((b + a*Cos[c + d*x])*Sec[c + d*x]*(-3*a^3*Sin[(c + d*x)/2] + 7*a*b^2*Sin [(c + d*x)/2]))/(3*b^4*d*(a + b*Sec[c + d*x])*(Cos[(c + d*x)/2] - Sin[(c + d*x)/2])) + ((b + a*Cos[c + d*x])*Sec[c + d*x]*(-3*a^3*Sin[(c + d*x)/2...
Time = 0.69 (sec) , antiderivative size = 271, normalized size of antiderivative = 1.37, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {3042, 4386, 3042, 3376, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\tan ^6(c+d x)}{a+b \sec (c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cot \left (c+d x+\frac {\pi }{2}\right )^6}{a+b \csc \left (c+d x+\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 4386 |
\(\displaystyle \int \frac {\sin (c+d x) \tan ^5(c+d x)}{a \cos (c+d x)+b}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos \left (c+d x+\frac {\pi }{2}\right )^6}{\sin \left (c+d x+\frac {\pi }{2}\right )^5 \left (a \sin \left (c+d x+\frac {\pi }{2}\right )+b\right )}dx\) |
\(\Big \downarrow \) 3376 |
\(\displaystyle \int \left (\frac {\left (3 a b^2-a^3\right ) \sec ^2(c+d x)}{b^4}-\frac {\left (a^2-b^2\right )^3}{a b^5 (a \cos (c+d x)+b)}+\frac {\left (a^2-3 b^2\right ) \sec ^3(c+d x)}{b^3}+\frac {\left (a^4-3 a^2 b^2+3 b^4\right ) \sec (c+d x)}{b^5}-\frac {a \sec ^4(c+d x)}{b^2}-\frac {1}{a}+\frac {\sec ^5(c+d x)}{b}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\left (a^2-3 b^2\right ) \text {arctanh}(\sin (c+d x))}{2 b^3 d}-\frac {a \left (a^2-3 b^2\right ) \tan (c+d x)}{b^4 d}+\frac {\left (a^2-3 b^2\right ) \tan (c+d x) \sec (c+d x)}{2 b^3 d}+\frac {\left (a^4-3 a^2 b^2+3 b^4\right ) \text {arctanh}(\sin (c+d x))}{b^5 d}-\frac {2 (a-b)^{5/2} (a+b)^{5/2} \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{a b^5 d}-\frac {a \tan ^3(c+d x)}{3 b^2 d}-\frac {a \tan (c+d x)}{b^2 d}-\frac {x}{a}+\frac {3 \text {arctanh}(\sin (c+d x))}{8 b d}+\frac {\tan (c+d x) \sec ^3(c+d x)}{4 b d}+\frac {3 \tan (c+d x) \sec (c+d x)}{8 b d}\) |
-(x/a) + (3*ArcTanh[Sin[c + d*x]])/(8*b*d) + ((a^2 - 3*b^2)*ArcTanh[Sin[c + d*x]])/(2*b^3*d) + ((a^4 - 3*a^2*b^2 + 3*b^4)*ArcTanh[Sin[c + d*x]])/(b^ 5*d) - (2*(a - b)^(5/2)*(a + b)^(5/2)*ArcTanh[(Sqrt[a - b]*Tan[(c + d*x)/2 ])/Sqrt[a + b]])/(a*b^5*d) - (a*Tan[c + d*x])/(b^2*d) - (a*(a^2 - 3*b^2)*T an[c + d*x])/(b^4*d) + (3*Sec[c + d*x]*Tan[c + d*x])/(8*b*d) + ((a^2 - 3*b ^2)*Sec[c + d*x]*Tan[c + d*x])/(2*b^3*d) + (Sec[c + d*x]^3*Tan[c + d*x])/( 4*b*d) - (a*Tan[c + d*x]^3)/(3*b^2*d)
3.3.94.3.1 Defintions of rubi rules used
Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Int[ExpandTrig[(d*sin[ e + f*x])^n*(a + b*sin[e + f*x])^m*(1 - sin[e + f*x]^2)^(p/2), x], x] /; Fr eeQ[{a, b, d, e, f}, x] && NeQ[a^2 - b^2, 0] && IntegersQ[m, 2*n, p/2] && ( LtQ[m, -1] || (EqQ[m, -1] && GtQ[p, 0]))
Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n _), x_Symbol] :> Int[Cos[c + d*x]^m*((b + a*Sin[c + d*x])^n/Sin[c + d*x]^(m + n)), x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0] && IntegerQ[n] && IntegerQ[m] && (IntegerQ[m/2] || LeQ[m, 1])
Leaf count of result is larger than twice the leaf count of optimal. \(410\) vs. \(2(181)=362\).
Time = 1.54 (sec) , antiderivative size = 411, normalized size of antiderivative = 2.08
method | result | size |
derivativedivides | \(\frac {-\frac {2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {2 \left (a -b \right ) \left (a^{5}+a^{4} b -2 a^{3} b^{2}-2 a^{2} b^{3}+a \,b^{4}+b^{5}\right ) \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{b^{5} a \sqrt {\left (a -b \right ) \left (a +b \right )}}+\frac {1}{4 b \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4}}-\frac {-2 a -3 b}{6 b^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {-4 a^{2}-4 a b +5 b^{2}}{8 b^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {\left (-8 a^{4}+20 a^{2} b^{2}-15 b^{4}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 b^{5}}-\frac {-8 a^{3}-4 a^{2} b +16 a \,b^{2}+7 b^{3}}{8 b^{4} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}-\frac {1}{4 b \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}-\frac {-2 a -3 b}{6 b^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {4 a^{2}+4 a b -5 b^{2}}{8 b^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {\left (8 a^{4}-20 a^{2} b^{2}+15 b^{4}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 b^{5}}-\frac {-8 a^{3}-4 a^{2} b +16 a \,b^{2}+7 b^{3}}{8 b^{4} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}}{d}\) | \(411\) |
default | \(\frac {-\frac {2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {2 \left (a -b \right ) \left (a^{5}+a^{4} b -2 a^{3} b^{2}-2 a^{2} b^{3}+a \,b^{4}+b^{5}\right ) \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{b^{5} a \sqrt {\left (a -b \right ) \left (a +b \right )}}+\frac {1}{4 b \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{4}}-\frac {-2 a -3 b}{6 b^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {-4 a^{2}-4 a b +5 b^{2}}{8 b^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {\left (-8 a^{4}+20 a^{2} b^{2}-15 b^{4}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 b^{5}}-\frac {-8 a^{3}-4 a^{2} b +16 a \,b^{2}+7 b^{3}}{8 b^{4} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}-\frac {1}{4 b \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}-\frac {-2 a -3 b}{6 b^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {4 a^{2}+4 a b -5 b^{2}}{8 b^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {\left (8 a^{4}-20 a^{2} b^{2}+15 b^{4}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 b^{5}}-\frac {-8 a^{3}-4 a^{2} b +16 a \,b^{2}+7 b^{3}}{8 b^{4} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}}{d}\) | \(411\) |
risch | \(-\frac {x}{a}-\frac {i \left (12 a^{2} b \,{\mathrm e}^{7 i \left (d x +c \right )}-27 b^{3} {\mathrm e}^{7 i \left (d x +c \right )}+24 a^{3} {\mathrm e}^{6 i \left (d x +c \right )}-72 a \,b^{2} {\mathrm e}^{6 i \left (d x +c \right )}+12 a^{2} b \,{\mathrm e}^{5 i \left (d x +c \right )}-3 b^{3} {\mathrm e}^{5 i \left (d x +c \right )}+72 a^{3} {\mathrm e}^{4 i \left (d x +c \right )}-168 a \,b^{2} {\mathrm e}^{4 i \left (d x +c \right )}-12 a^{2} b \,{\mathrm e}^{3 i \left (d x +c \right )}+3 b^{3} {\mathrm e}^{3 i \left (d x +c \right )}+72 a^{3} {\mathrm e}^{2 i \left (d x +c \right )}-152 a \,b^{2} {\mathrm e}^{2 i \left (d x +c \right )}-12 a^{2} b \,{\mathrm e}^{i \left (d x +c \right )}+27 b^{3} {\mathrm e}^{i \left (d x +c \right )}+24 a^{3}-56 a \,b^{2}\right )}{12 d \,b^{4} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}-\frac {\sqrt {a^{2}-b^{2}}\, a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {b +i \sqrt {a^{2}-b^{2}}}{a}\right )}{d \,b^{5}}+\frac {2 \sqrt {a^{2}-b^{2}}\, a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {b +i \sqrt {a^{2}-b^{2}}}{a}\right )}{d \,b^{3}}-\frac {\sqrt {a^{2}-b^{2}}\, \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {b +i \sqrt {a^{2}-b^{2}}}{a}\right )}{d b a}+\frac {\sqrt {a^{2}-b^{2}}\, a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {i \sqrt {a^{2}-b^{2}}-b}{a}\right )}{d \,b^{5}}-\frac {2 \sqrt {a^{2}-b^{2}}\, a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {i \sqrt {a^{2}-b^{2}}-b}{a}\right )}{d \,b^{3}}+\frac {\sqrt {a^{2}-b^{2}}\, \ln \left ({\mathrm e}^{i \left (d x +c \right )}-\frac {i \sqrt {a^{2}-b^{2}}-b}{a}\right )}{d b a}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) a^{4}}{d \,b^{5}}-\frac {5 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) a^{2}}{2 d \,b^{3}}+\frac {15 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{8 d b}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) a^{4}}{d \,b^{5}}+\frac {5 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) a^{2}}{2 d \,b^{3}}-\frac {15 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{8 d b}\) | \(703\) |
1/d*(-2/a*arctan(tan(1/2*d*x+1/2*c))-2/b^5*(a-b)*(a^5+a^4*b-2*a^3*b^2-2*a^ 2*b^3+a*b^4+b^5)/a/((a-b)*(a+b))^(1/2)*arctanh((a-b)*tan(1/2*d*x+1/2*c)/(( a-b)*(a+b))^(1/2))+1/4/b/(tan(1/2*d*x+1/2*c)-1)^4-1/6*(-2*a-3*b)/b^2/(tan( 1/2*d*x+1/2*c)-1)^3-1/8*(-4*a^2-4*a*b+5*b^2)/b^3/(tan(1/2*d*x+1/2*c)-1)^2+ 1/8/b^5*(-8*a^4+20*a^2*b^2-15*b^4)*ln(tan(1/2*d*x+1/2*c)-1)-1/8*(-8*a^3-4* a^2*b+16*a*b^2+7*b^3)/b^4/(tan(1/2*d*x+1/2*c)-1)-1/4/b/(tan(1/2*d*x+1/2*c) +1)^4-1/6*(-2*a-3*b)/b^2/(tan(1/2*d*x+1/2*c)+1)^3-1/8*(4*a^2+4*a*b-5*b^2)/ b^3/(tan(1/2*d*x+1/2*c)+1)^2+1/8*(8*a^4-20*a^2*b^2+15*b^4)/b^5*ln(tan(1/2* d*x+1/2*c)+1)-1/8*(-8*a^3-4*a^2*b+16*a*b^2+7*b^3)/b^4/(tan(1/2*d*x+1/2*c)+ 1))
Time = 0.61 (sec) , antiderivative size = 603, normalized size of antiderivative = 3.05 \[ \int \frac {\tan ^6(c+d x)}{a+b \sec (c+d x)} \, dx=\left [-\frac {48 \, b^{5} d x \cos \left (d x + c\right )^{4} - 24 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \sqrt {a^{2} - b^{2}} \cos \left (d x + c\right )^{4} \log \left (\frac {2 \, a b \cos \left (d x + c\right ) - {\left (a^{2} - 2 \, b^{2}\right )} \cos \left (d x + c\right )^{2} - 2 \, \sqrt {a^{2} - b^{2}} {\left (b \cos \left (d x + c\right ) + a\right )} \sin \left (d x + c\right ) + 2 \, a^{2} - b^{2}}{a^{2} \cos \left (d x + c\right )^{2} + 2 \, a b \cos \left (d x + c\right ) + b^{2}}\right ) - 3 \, {\left (8 \, a^{5} - 20 \, a^{3} b^{2} + 15 \, a b^{4}\right )} \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, {\left (8 \, a^{5} - 20 \, a^{3} b^{2} + 15 \, a b^{4}\right )} \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (8 \, a^{2} b^{3} \cos \left (d x + c\right ) - 6 \, a b^{4} + 8 \, {\left (3 \, a^{4} b - 7 \, a^{2} b^{3}\right )} \cos \left (d x + c\right )^{3} - 3 \, {\left (4 \, a^{3} b^{2} - 9 \, a b^{4}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{48 \, a b^{5} d \cos \left (d x + c\right )^{4}}, -\frac {48 \, b^{5} d x \cos \left (d x + c\right )^{4} + 48 \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \sqrt {-a^{2} + b^{2}} \arctan \left (-\frac {\sqrt {-a^{2} + b^{2}} {\left (b \cos \left (d x + c\right ) + a\right )}}{{\left (a^{2} - b^{2}\right )} \sin \left (d x + c\right )}\right ) \cos \left (d x + c\right )^{4} - 3 \, {\left (8 \, a^{5} - 20 \, a^{3} b^{2} + 15 \, a b^{4}\right )} \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, {\left (8 \, a^{5} - 20 \, a^{3} b^{2} + 15 \, a b^{4}\right )} \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (8 \, a^{2} b^{3} \cos \left (d x + c\right ) - 6 \, a b^{4} + 8 \, {\left (3 \, a^{4} b - 7 \, a^{2} b^{3}\right )} \cos \left (d x + c\right )^{3} - 3 \, {\left (4 \, a^{3} b^{2} - 9 \, a b^{4}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{48 \, a b^{5} d \cos \left (d x + c\right )^{4}}\right ] \]
[-1/48*(48*b^5*d*x*cos(d*x + c)^4 - 24*(a^4 - 2*a^2*b^2 + b^4)*sqrt(a^2 - b^2)*cos(d*x + c)^4*log((2*a*b*cos(d*x + c) - (a^2 - 2*b^2)*cos(d*x + c)^2 - 2*sqrt(a^2 - b^2)*(b*cos(d*x + c) + a)*sin(d*x + c) + 2*a^2 - b^2)/(a^2 *cos(d*x + c)^2 + 2*a*b*cos(d*x + c) + b^2)) - 3*(8*a^5 - 20*a^3*b^2 + 15* a*b^4)*cos(d*x + c)^4*log(sin(d*x + c) + 1) + 3*(8*a^5 - 20*a^3*b^2 + 15*a *b^4)*cos(d*x + c)^4*log(-sin(d*x + c) + 1) + 2*(8*a^2*b^3*cos(d*x + c) - 6*a*b^4 + 8*(3*a^4*b - 7*a^2*b^3)*cos(d*x + c)^3 - 3*(4*a^3*b^2 - 9*a*b^4) *cos(d*x + c)^2)*sin(d*x + c))/(a*b^5*d*cos(d*x + c)^4), -1/48*(48*b^5*d*x *cos(d*x + c)^4 + 48*(a^4 - 2*a^2*b^2 + b^4)*sqrt(-a^2 + b^2)*arctan(-sqrt (-a^2 + b^2)*(b*cos(d*x + c) + a)/((a^2 - b^2)*sin(d*x + c)))*cos(d*x + c) ^4 - 3*(8*a^5 - 20*a^3*b^2 + 15*a*b^4)*cos(d*x + c)^4*log(sin(d*x + c) + 1 ) + 3*(8*a^5 - 20*a^3*b^2 + 15*a*b^4)*cos(d*x + c)^4*log(-sin(d*x + c) + 1 ) + 2*(8*a^2*b^3*cos(d*x + c) - 6*a*b^4 + 8*(3*a^4*b - 7*a^2*b^3)*cos(d*x + c)^3 - 3*(4*a^3*b^2 - 9*a*b^4)*cos(d*x + c)^2)*sin(d*x + c))/(a*b^5*d*co s(d*x + c)^4)]
\[ \int \frac {\tan ^6(c+d x)}{a+b \sec (c+d x)} \, dx=\int \frac {\tan ^{6}{\left (c + d x \right )}}{a + b \sec {\left (c + d x \right )}}\, dx \]
Exception generated. \[ \int \frac {\tan ^6(c+d x)}{a+b \sec (c+d x)} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*a^2-4*b^2>0)', see `assume?` f or more de
Leaf count of result is larger than twice the leaf count of optimal. 746 vs. \(2 (181) = 362\).
Time = 2.11 (sec) , antiderivative size = 746, normalized size of antiderivative = 3.77 \[ \int \frac {\tan ^6(c+d x)}{a+b \sec (c+d x)} \, dx=\text {Too large to display} \]
-1/24*(24*((a^4 + a^3*b - 2*a^2*b^2 - 2*a*b^3 + b^4)*sqrt(-a^2 + b^2)*abs( a)*abs(-a + b)*abs(b) + (a^5*b + a^4*b^2 - 2*a^3*b^3 - 2*a^2*b^4 + a*b^5 + 2*b^6)*sqrt(-a^2 + b^2)*abs(-a + b))*(pi*floor(1/2*(d*x + c)/pi + 1/2) + arctan(tan(1/2*d*x + 1/2*c)/sqrt(-(b^6 + sqrt(b^12 + (a*b^5 + b^6)*(a*b^5 - b^6)))/(a*b^5 - b^6))))/((a*b^4 - b^5)*a^2*b^2 + (a*b^6 - b^7)*abs(a)*ab s(b)) + 24*(a^6*b - 3*a^4*b^3 + 3*a^2*b^5 + a*b^6 - 2*b^7 - a^5*abs(a)*abs (b) + 3*a^3*b^2*abs(a)*abs(b) - 3*a*b^4*abs(a)*abs(b) + b^5*abs(a)*abs(b)) *(pi*floor(1/2*(d*x + c)/pi + 1/2) + arctan(tan(1/2*d*x + 1/2*c)/sqrt(-(b^ 6 - sqrt(b^12 + (a*b^5 + b^6)*(a*b^5 - b^6)))/(a*b^5 - b^6))))/(a^2*b^6 - b^6*abs(a)*abs(b)) - 3*(8*a^4 - 20*a^2*b^2 + 15*b^4)*log(abs(tan(1/2*d*x + 1/2*c) + 1))/b^5 + 3*(8*a^4 - 20*a^2*b^2 + 15*b^4)*log(abs(tan(1/2*d*x + 1/2*c) - 1))/b^5 - 2*(24*a^3*tan(1/2*d*x + 1/2*c)^7 + 12*a^2*b*tan(1/2*d*x + 1/2*c)^7 - 48*a*b^2*tan(1/2*d*x + 1/2*c)^7 - 21*b^3*tan(1/2*d*x + 1/2*c )^7 - 72*a^3*tan(1/2*d*x + 1/2*c)^5 - 12*a^2*b*tan(1/2*d*x + 1/2*c)^5 + 17 6*a*b^2*tan(1/2*d*x + 1/2*c)^5 + 45*b^3*tan(1/2*d*x + 1/2*c)^5 + 72*a^3*ta n(1/2*d*x + 1/2*c)^3 - 12*a^2*b*tan(1/2*d*x + 1/2*c)^3 - 176*a*b^2*tan(1/2 *d*x + 1/2*c)^3 + 45*b^3*tan(1/2*d*x + 1/2*c)^3 - 24*a^3*tan(1/2*d*x + 1/2 *c) + 12*a^2*b*tan(1/2*d*x + 1/2*c) + 48*a*b^2*tan(1/2*d*x + 1/2*c) - 21*b ^3*tan(1/2*d*x + 1/2*c))/((tan(1/2*d*x + 1/2*c)^2 - 1)^4*b^4))/d
Time = 16.74 (sec) , antiderivative size = 9148, normalized size of antiderivative = 46.20 \[ \int \frac {\tan ^6(c+d x)}{a+b \sec (c+d x)} \, dx=\text {Too large to display} \]
((tan(c/2 + (d*x)/2)*(16*a*b^2 + 4*a^2*b - 8*a^3 - 7*b^3))/(4*b^4) - (tan( c/2 + (d*x)/2)^7*(16*a*b^2 - 4*a^2*b - 8*a^3 + 7*b^3))/(4*b^4) - (tan(c/2 + (d*x)/2)^3*(176*a*b^2 + 12*a^2*b - 72*a^3 - 45*b^3))/(12*b^4) + (tan(c/2 + (d*x)/2)^5*(176*a*b^2 - 12*a^2*b - 72*a^3 + 45*b^3))/(12*b^4))/(d*(6*ta n(c/2 + (d*x)/2)^4 - 4*tan(c/2 + (d*x)/2)^2 - 4*tan(c/2 + (d*x)/2)^6 + tan (c/2 + (d*x)/2)^8 + 1)) + (2*atan((((((((((128*(192*a^2*b^22 - 256*a^3*b^2 1 - 568*a^4*b^20 + 1016*a^5*b^19 + 280*a^6*b^18 - 1176*a^7*b^17 + 288*a^8* b^16 + 416*a^9*b^15 - 192*a^10*b^14))/b^16 - (tan(c/2 + (d*x)/2)*(128*a^2* b^23 - 384*a^3*b^22 + 512*a^4*b^21 - 512*a^5*b^20 + 384*a^6*b^19 - 128*a^7 *b^18)*128i)/(a*b^16))*1i)/a - (128*tan(c/2 + (d*x)/2)*(128*b^23 - 384*a*b ^22 - 322*a^2*b^21 + 1222*a^3*b^20 + 903*a^4*b^19 - 3047*a^5*b^18 + 755*a^ 6*b^17 + 905*a^7*b^16 + 120*a^8*b^15 + 1000*a^9*b^14 - 1792*a^10*b^13 - 51 2*a^11*b^12 + 1472*a^12*b^11 - 192*a^13*b^10 - 384*a^14*b^9 + 128*a^15*b^8 ))/b^16)*1i)/a - (128*(576*a*b^21 - 192*b^22 + 1043*a^2*b^20 - 2996*a^3*b^ 19 - 3575*a^4*b^18 + 8886*a^5*b^17 + 7376*a^6*b^16 - 18310*a^7*b^15 - 7672 *a^8*b^14 + 24883*a^9*b^13 + 2308*a^10*b^12 - 21295*a^11*b^11 + 2736*a^12* b^10 + 11096*a^13*b^9 - 3080*a^14*b^8 - 3256*a^15*b^7 + 1248*a^16*b^6 + 41 6*a^17*b^5 - 192*a^18*b^4))/b^16)*1i)/a - (128*tan(c/2 + (d*x)/2)*(1414*a* b^20 - 64*a^20*b + 64*a^21 - 514*b^21 + 684*a^2*b^19 - 3084*a^3*b^18 - 434 0*a^4*b^17 + 6000*a^5*b^16 + 15860*a^6*b^15 - 14740*a^7*b^14 - 27983*a^...